import axios from "axios";



//所有分类
let all = (params) => axios.get('/api/category/all', { params });

//子分类
let sub = (params) => axios.get('/api/category/sub', { params })

//添加
let add = (data) => axios.post('/api/category', data);

//编辑
let edit = (data) => axios.put('/api/category', data);

//删除
let remove = (params) => axios.delete('/api/category', { params })

export default {
	all,
	sub,
	add,
	edit,
	remove
}
